using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.FIM
{
    using System;
    using System.Collections.Generic;

    [Table("fim_payments"), DataContract]
    //[Table("FimPay"), DataContract]
    public class Pay
    {

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "PayId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("pay_seq")]
        public int PayId { get; set; }

        //[ForeignKey("MasBudgetSource")]
        [DataMember, Display(Name = "BgmSourceId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("bgm_source_seq")]
        public int BgSourceId { get; set; }

        //[ForeignKey("MasWorkArea")]
        [DataMember, Display(Name = "WorkAreaId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("work_area_seq")]
        public int WorkAreaId { get; set; }

        [DataMember, Display(Name = "BgmYear", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("bgm_year")]
        public int BgYear { get; set; }

        //[ForeignKey("PayEvent")]
        [DataMember, Display(Name = "EventId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("event_seq")]
        public int PayEventId { get; set; }

        [DataMember, Display(Name = "PayDate", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("pay_date")]
        public Nullable<System.DateTime> PayDate { get; set; }

        [DataMember, Display(Name = "RealPayDate", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("real_pay_date")]
        public Nullable<System.DateTime> RealPayDate { get; set; }

        [DataMember, Display(Name = "RefNo", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("ref_no")]
        public string Code { get; set; }

        [DataMember, Display(Name = "ReceiptNo", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("receipt_no")]
        public string ReceiptNo { get; set; }

        [DataMember, Display(Name = "ReceiptName", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("receipt_name")]
        public string ReceiptName { get; set; }

        [DataMember, Display(Name = "PayName", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("pay_name")]
        public string Name { get; set; }

        //[ForeignKey("PayMethod")]
        [DataMember, Display(Name = "MethodId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("method_seq")]
        public Nullable<int> PayMethodId { get; set; }

        //[ForeignKey("PayRequest")]
        [DataMember, Display(Name = "MoneyReqId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("money_req_seq")]
        public Nullable<int> PayReqId { get; set; }

        //[ForeignKey("Petition")]
        [DataMember, Display(Name = "PetitionId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("petition_seq")]
        public Nullable<int> PetitionId { get; set; }

        //[ForeignKey("PetitionDtl")]
        [DataMember, Display(Name = "PetitionDtlsId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("petition_dtls_seq")]
        public Nullable<int> PetitionDtlId { get; set; }

        //[ForeignKey("Employee")]
        [DataMember, Display(Name = "EmpId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("emp_seq")]
        public Nullable<int> EmpId { get; set; }

        //[ForeignKey("MasContact")]
        [DataMember, Display(Name = "ContactId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("contact_seq")]
        public Nullable<int> ContactId { get; set; }

        //[DataMember]
        //[Column("temp_contact_name")]
        //public string TempContactName { get; set; }

        //[ForeignKey("ReturnBidderCollateral")]
        //[DataMember, Display(Name = "BidderId", ResourceType = typeof(Resources.PaymentsResource))]
        //[Column("bidder_col_id")]
        //public Nullable<int> BidderColId { get; set; }

        //[ForeignKey("Po")]
        //[DataMember, Display(Name = "PoId", ResourceType = typeof(Resources.PaymentsResource))]
        //public Nullable<int> PoId { get; set; }

        [DataMember, Display(Name = "Amount", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("amount")]
        public Nullable<decimal> Amount { get; set; }

        [DataMember, Display(Name = "VatRate", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("vat_rate")]
        public Nullable<decimal> VatRate { get; set; }

        [DataMember, Display(Name = "Vat", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("vat")]
        public Nullable<decimal> Vat { get; set; }

        [DataMember, Display(Name = "TaxRate", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("tax_rate")]
        public Nullable<decimal> TaxRate { get; set; }

        [DataMember, Display(Name = "Tax", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("tax")]
        public Nullable<decimal> Tax { get; set; }

        //[DataMember]
        //[Column("net_amount")]
        //public Nullable<decimal> NetAmount { get; set; }

        //[ForeignKey("PostPay")]
        [DataMember, Display(Name = "PostPayId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("post_pay_seq")]
        public Nullable<int> PostPayId { get; set; }

        //[ForeignKey("EmployeeTax")]
        //[DataMember, Display(Name = "TaxPayId", ResourceType = typeof(Resources.PaymentsResource))]
        //public Nullable<int> TaxPayId { get; set; }

        //[DataMember, Display(Name = "ApprovedBy", ResourceType = typeof(Resources.PaymentsResource))]
        //public Nullable<int> ApprovedBy { get; set; }

        //[DataMember, Display(Name = "ApprovedWhen", ResourceType = typeof(Resources.PaymentsResource))]
        //public Nullable<System.DateTime> ApprovedWhen { get; set; }

        //[ForeignKey("TransectionGroup")]
        [DataMember, Display(Name = "TranGrpId", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("tran_grp_seq")]
        public Nullable<int> TranGrpId { get; set; }

        [DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("remarks")]
        public string Remarks { get; set; }

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("record_status")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("created_by")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("created_when")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("updated_by")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.PaymentsResource))]
        [Column("updated_when")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        //public virtual BGM.MasBudgetSource MasBudgetSource { get; set; }

        //public virtual HRM.MasWorkArea MasWorkArea { get; set; }

        ////public virtual FIM.FimMasLookUp PayEvent { get; set; }

        ////public virtual FIM.FimMasLookUp PayMethod { get; set; }

        //public virtual FIM.PayRequest PayRequest { get; set; }

        //public virtual Petition Petition { get; set; }

        //public virtual PetitionDtl PetitionDtl { get; set; }

        //public virtual HRM.Employee Employee { get; set; }

        //public virtual ICM.MasContact MasContact { get; set; }

        //public virtual ICM.BidderCollateral ReturnBidderCollateral { get; set; }

        //public virtual Pay PostPay { get; set; }

        ////public virtual EmployeeTax EmployeeTax { get; set; }

        //public virtual ACM.TransectionGroup TransectionGroup { get; set; }

    }
}